import baseservice from '../common/baseservice.js';
export default {
	initWKIT(self) {
		return new Promise(function(resolve, reject) {
//			debugger;!window.Messenger
			if(true){
				var script = document.createElement("script");
				script.type = "text/javascript";
				script.src = "https://g.alicdn.com/aliww/??h5.openim.sdk/1.0.6/scripts/wsdk.js,h5.openim.kit/0.3.3/scripts/kit.js";
				script.onerror = reject;
				document.head.appendChild(script);
	
				var script1 = document.createElement("script");
				script1.type = "text/javascript";
				script1.src = "https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js";
				script1.onerror = reject;
				document.head.appendChild(script1);
			}
			
			setTimeout(() => {
				resolve(WKIT)
			}, 500);
		})
	},
	getmyaliAccount(self, successBack) {
		self.httptool.ajaxPost(self.apis.aliAccountGet, {}, successBack);
	}
}